﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RPGKata
{
    class Weapon
    {
        public Weapon()
        {

        }

        public Weapon(string n, int d)
        {
            name = n;
            damage = d;
        }

        public string name { get; set; }
        public int damage { get; set; }
        public string baseAttribute { get; set; }

        public void setDamage(string num)
        {
            while (!Roll.isValidInt(num))
            {
                Console.WriteLine("That's not a number between 0 and 20! Please choose again.");
                num = Console.ReadLine();
            }
            int number = int.Parse(num);
            damage = number;
        }

        public void setBaseAttribute()
        {
            switch (Roll.randomNumber(0, 1))
            {
                case 0:
                    baseAttribute = "Strength";
                    break;
                case 1:
                    baseAttribute = "Dexterity";
                    break;
            }
        }
    }
}
